package com.r_z.controller;

import com.r_z.entity.Goods;
import com.r_z.service.impl.PurchaseServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 周楠櫻木
 * @version 1.0
 * @date 2023/6/8
 */
@RestController
@CrossOrigin
public class PurchaseController {
    @Resource
    PurchaseServiceImpl purchaseServiceImpl;
    /**
     * 采购列表(采购详情列表)的增加方法
     * @param goods 接收的采购商品结果集
     * @return boolean
     */
    @RequestMapping("insertPurchase")
    public boolean insertPurchase(@RequestBody Goods[] goods){
        System.out.println("我特么进来了");
        return purchaseServiceImpl.insertPurchase(goods);
    }
}
